package com.kmt.plaza.sevice;

import com.kmt.plaza.entity.Orders;
import com.kmt.plaza.vo.ResultVO;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;
import java.util.HashMap;

@Repository
public interface OrderService {
    public HashMap<String,String> addOrder(String cids, Orders order) throws SQLException;
    /**
     * 付款成功修改订单的状态
     */
    public int updateOrderStatus(String orderId,String status);
    /**
     * 评价成功修改订单的状态
     */
    public int updateOrderStatu(String orderId);
    /**
     * 根据订单好获取订单状态
     */
    public ResultVO getOrderById(String orderId);
    /**
     * 用户中心订单查询
     */
    public ResultVO OrderList(String userId,String status,int pageNum,int limit);
    /**
     * 管理员查询所有订单
     */
    public ResultVO selectAllOrderList(int pageNum,int limit);
    /**
     * 管理员按订单状态查询订单
     */
    public ResultVO selectByStatus(int pageNum,int limit);
    /**
     * 管理员查看今日订单
     */
//    public ResultVO selectTodayOrder();
    //删除已关闭订单
    public ResultVO deleteByOrderId(String orderId);

    /**
     * 按条件查询订单
     * @param keyWord
     * @param status
     * @param payType
     * @param receiverName
     * @return
     */
    public ResultVO selectByOrderCondition(String keyWord,String status,Integer payType,String receiverName);
    /**
     * 管理员删除订单
     */
    public int deleteUser(String orderId);

    //点击去支付将订单的状态改为待发货
    public int TopayUpdateOrderStatus(String orderId);
    //管理员发货
    public int immediateDelivery(String orderId);
    /**
     * 点击确认收货修改订单状态为待评价
     */
    public int ConfirmReceipt(String orderId);
}
